package com.example.smartcity_poverty.ui.SmartSubject.AllSubjectActivity.PovertyActivity.fragment.poverty.activity

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.MenuItem
import android.view.View
import com.example.smartcity_poverty.R
import kotlinx.android.synthetic.main.activity_rh.*


class RhActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        supportActionBar?.setDisplayHomeAsUpEnabled(true)
        setContentView(R.layout.activity_rh)
        title = "详细"

        val id = intent.getStringExtra("id")
        id?.let {
            if (id.toInt() == 1) pp1Layout.visibility = View.VISIBLE
            else pp1Layout.visibility = View.GONE

            if (id.toInt() == 2) pp2Layout.visibility = View.VISIBLE
            else pp2Layout.visibility = View.GONE
        }

    }

    override fun onOptionsItemSelected(item: MenuItem): Boolean {
        finish()
        return super.onOptionsItemSelected(item)
    }
}